LIB += -lcuda -lcudart -lpthread

NVCC = nvcc
GCC  = gcc

all: project

project.o: project.cu
	$(NVCC) $< -c $@

user_message.o: user_message.cu
	$(NVCC) $< -c $@
	
single_thread.o: single_thread.cpp
	$(NVCC) $< -c $@
	
averagekernel.o: averagekernel.cu
	$(NVCC) -arch=sm_20 $< -c $@
	
subtractkernel.o: subtractkernel.cu
	$(NVCC) -arch=sm_20 $< -c $@
	
project: user_message.o single_thread.o averagekernel.o subtractkernel.o project.o  
	$(NVCC) -arch=sm_20 $^ -o $@ ${LIB}

clean:
	rm -rf *.o project
